﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using bordspil.Models;

namespace bordspil.Controllers
{

    public class GameController : Controller
    {
        public ActionResult Connect4Games(int id)
        {
            AppDataContext db = new AppDataContext();

            var instance = (from game in db.GameInstances
                            where game.ID == id
                            select game).SingleOrDefault();

            if (instance != null)
            {
                return View(instance);
            }

            return View("NotFound");
        }
        private IAppRepository _repository = null;

    }
}

